var app = getApp();
var req = require("../../utils/req.js");
var url = require("../../utils/url.js");
Page({

  /**
   * 页面的初始数据
   */
  data: {
    storeList:'',
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getStoreList();
  },
  /**
   * 获取门店列表
   */
  getStoreList: function () {
    var that = this;
    var data = {
    };
    req.userRequest("请稍等", "POST",url.store['storeEntrance'], data, function back(res) {
      console.log(res.data)
      that.setData({
        storeList:res.data
      });
    });
  },

  /**
   * 跳转门店详情
   */
  gotoMeStoreDetail:function(event){
    var id = event.currentTarget.dataset.id;
    console.log(id);
    wx.navigateTo({
      url: '../MeStoreDetail/MeStoreDetail?id='+id,
    })
  }
})